﻿@{
    ViewBag.Title = "Themthietbi";
    Layout = "~/Views/Shared/_Adminlayout.cshtml";
}

@using (@Html.BeginForm("Themtb", "Admin", FormMethod.Post, new { enctype = "multipart/form-data" }))
{

    <h1>Thêm thiết bị</h1>

  

    <div class="form-group">
        <label>Tên thiết bị</label>
        <input class="form-control" name="ten" value="">
    </div>
    <div class="form-group">
        <label>ID cha</label>
        <select id="Select1" class="form-control" name="idcha">

            @foreach (var item in ViewBag.idcha)
            {
                <option value="@item.id">@item.ten</option>
            }

        </select>
    </div>
    <div class="form-group">
        <label>Thông số</label>
        <input class="form-control" name="thongso" value="">
    </div>
    <div class="form-group">
        <label>Mô tả</label>
        <input class="form-control" name="mota" value="">
    </div>
    <div class="form-group">
        <label>Giá</label>
        <input class="form-control" name="gia" value="">
    </div>
    <div class="form-group">
        <label>Hướng dẫn</label>
        <input class="form-control" name="huongdan" value="">
    </div>
    <div class="form-group">
        <label>Hình</label>
        <input class="form-control" type="file" name="file">
    </div>
    <div class="form-group">
        <label>Cong cu sua</label>
         <textarea id="TextArea1" class="contact_textarea" name="main"></textarea>
    </div>
    <button type="submit" class="btn btn-default">Thêm</button>
}
<script type="text/javascript">
    var editor;
    function createEditor(languageCode, id) {
        var editor = CKEDITOR.replace(id, {
            language: languageCode
        });
    }

    $(function () {
        createEditor('vi', 'TextArea1');
    });
</script>